package com.dldata.display.entity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by 吴岳峰 on 2017/07/11.
 */
@Entity
@Table(name = "sys_dtwy_zbb")
public class SysDtwyZbbEntity {
    private String id;
    private Timestamp rq;
    private String week;
    private String userName;
    private String type;
    private String bz;
    private String ksId;

    @Id
    @Column(name = "id", nullable = false)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "rq", nullable = true)
    public Timestamp getRq() {
        return rq;
    }

    public void setRq(Timestamp rq) {
        this.rq = rq;
    }

    @Basic
    @Column(name = "week", nullable = true, length = 50)
    public String getWeek() {
        return week;
    }

    public void setWeek(String week) {
        this.week = week;
    }

    @Basic
    @Column(name = "user_name", nullable = true, length = 50)
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "type", nullable = true, length = 50)
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "bz", nullable = true, length = 500)
    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    @Basic
    @Column(name = "ks_id", nullable = true)
    public String getKsId() {
        return ksId;
    }

    public void setKsId(String ksId) {
        this.ksId = ksId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SysDtwyZbbEntity that = (SysDtwyZbbEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (rq != null ? !rq.equals(that.rq) : that.rq != null) return false;
        if (week != null ? !week.equals(that.week) : that.week != null) return false;
        if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (bz != null ? !bz.equals(that.bz) : that.bz != null) return false;
        if (ksId != null ? !ksId.equals(that.ksId) : that.ksId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (rq != null ? rq.hashCode() : 0);
        result = 31 * result + (week != null ? week.hashCode() : 0);
        result = 31 * result + (userName != null ? userName.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (bz != null ? bz.hashCode() : 0);
        result = 31 * result + (ksId != null ? ksId.hashCode() : 0);
        return result;
    }
}
